/**
 * ActionTestCase.java 1.0 2007-5-25 上午01:05:40,创建 by yangfan
 */


package org.in4j.bbs.action;

import java.sql.Timestamp;

import org.in4j.bbs.model.OnlineInfo;
import org.in4j.bbs.model.User;

/**
 *
 * @author yangfan
 * @version 1.0 2007-5-25 上午01:05:40,创建
 */
public class ActionTestCase
{
	public final static Timestamp NOW = new Timestamp(System.currentTimeMillis());

	public final static String USER_NAME = "fyting";
	public final static String USER_IP = "172.16.1.198";
	public final static String GUEST_IP = "172.16.1.111";

	protected OnlineInfo getOnlineInfo()
	{
		OnlineInfo onlineInfo = new OnlineInfo();
		onlineInfo.setIp(USER_IP);
		onlineInfo.setLoginTime(NOW);
		User user = new User();
		user.setName(USER_NAME);
		onlineInfo.setUser(user);
		return onlineInfo;
	}

	protected OnlineInfo getGuestOnlineInfo()
	{
		OnlineInfo onlineInfo = new OnlineInfo();
		onlineInfo.setIp(GUEST_IP);
		onlineInfo.setLoginTime(NOW);
		User user = new User();
		user.setName(User.GUEST);
		onlineInfo.setUser(user);
		return onlineInfo;
	}
}
